#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1e5+50;
const ll INF=1e10+10;
int t,n,m;
ll a[N];
bool vis[N];
int main(void){
    scanf("%d",&t);
    while(t--){
        memset(a,0,sizeof(a));
        memset(vis,false,sizeof(vis));
        scanf("%d%d",&n,&m);
        int zero=0;
        for(int i=0;i<n;i++){
            scanf("%lld",&a[i]);
            if(a[i]==0){
                zero++;
            }
        }
        if(n==m){
            printf("Richman\n");
            continue;
        }
        if(zero>m){
            printf("Impossible\n");
        }else{
            m-=zero;
            ll ans=0;
            for(int i=0;i<n && m>=1;i++){
                if(a[i]==0){
                    continue;
                }
                ans+=a[i];
                vis[i]=true;
                m--;
            }
            ll Min=INF;
            for(int i=0;i<n;i++){
                if(a[i]==0 || vis[i]==true){
                    continue;
                }
                if(a[i]<Min){
                    Min=a[i];
                }
            }
            ans+=(Min-1);
            printf("%lld\n",ans);
        }
    }
    return 0;
}